package com.me.JuneCo;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.*;

public class Tile {
	public static Texture tileSetTexture;
	//32 pixel tiles makes the game world 25 across and 15 vertical
	public final static int TILE_SIZE = 32;
	
	public static Rectangle getSourceRectangle(int tileIndex)
	{
		int tileY = tileIndex / (tileSetTexture.getWidth() / TILE_SIZE);
		int tileX = tileIndex % (tileSetTexture.getWidth() / TILE_SIZE);
		return new Rectangle(tileX * TILE_SIZE, tileY * TILE_SIZE, TILE_SIZE, TILE_SIZE);
	}
}
